package com.siemens.industrial.utils;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

/**
 * Created by qupen on 2016/10/12.
 */
public enum ConfigurationUtil {
    INSTANCE;

    private Properties properties = null;

    ConfigurationUtil(){
        InputStream stream = this.getClass().getResourceAsStream("/configuration.properties");
        properties=new Properties();
        try {
            properties.load(stream);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public String getImagePath(){return properties.getProperty("imagePath");}

    public String getPreferredStorageEngine() {
        return properties.getProperty("storage.preferredEngine");
    }

    public String getAddPath() {
        return properties.getProperty("addPath");
    }

    public String getAcPath() {
        return properties.getProperty("acPath");
    }

    public String getExcelPath() {
        return properties.getProperty("excelPath");
    }

    public String getDeviceXmlPath() {
        return properties.getProperty("deviceXmlPath");
    }

}
